//
// Created by Jisam on 2024/8/16 19:08.
// Solution of  T497973 游戏与共同语言
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <vector>

using namespace std;

#define endl "\n"
#define PSI pair<string,int>
#define PII pair<int,int>
#define PDI pair<double,int>
#define PDD pair<double,double>
#define VVI vector<vector<int>>
#define VI vector<int>
#define VS vector<string>

#define PQLI priority_queue<int, vector<int>, less<int>>
#define PQGI priority_queue<int, vector<int>, greater<int>>
#define ui unsigned
#define lli long long
#define ulli unsigned long long
#define code_by_jisam ios::sync_with_stdio(false),cin.tie(nullptr)
using namespace std;
struct node{
    int w,c,t;
};

void solution() {
    int a1,b1,c1;
    cin >> a1 >> b1 >> c1;
    int a2,b2,c2;
    cin >> a2 >> b2 >> c2;
//    cout << "A";
    if(a1 > a2){
        cout << "A";
        return ;
    }
    else if(a2 > a1){
        cout << "B";
        return ;
    }else{
        if(b1 > b2){
            cout << "A";
            return ;
        }else if (b1 < b2){
            cout << "B";
            return ;
        }else{
            if(c1 > c2){
                cout << "A";
                return ;
            }else if (c1 < c2){
                cout << "B";
                return ;
            }
        }
    }
}

int main() {
    code_by_jisam;
    int T = 1;
//    cin >> T;
    while (T--) {
        solution();
    }
    return 0;
}